﻿<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
	<meta charset="utf-8" />
    <script src="/LiberUI/Scripts/jquery.js"></script>
    <script src="/LiberUI/Scripts/LiberUI.Base.js"></script>
    <script src="/LiberUI/Scripts/LiberUI.js"></script>
    <script src="/LiberUI/Scripts/LiberUI.Action.js"></script>
</head>
<body>
    <form>
        <input type="file" placeholder="文件上传" id="upload" />
    </form>
    
    <script>
        function loadFile() {
            var f = $("#upload")[0].files[0];
            reader = new FileReader();
            reader.onload = upload;
            reader.readAsArrayBuffer(f);
        };
        function upload(ev) {
            handler = new XMLHttpRequest();
            handler.open("post", "/File/UploadOpenBizDoc?appid=1010101010101010101010&doctype=Order-Purchasecontract&objid=4737b073-026b-4ca6-bc4d-bb56a12f722c");
            handler.send(this.result);
        };
        $(function () {
            $("#upload").on("change", loadFile);
        })
    </script>
</body>
</html>
